package org.csu.mypetstorebackstage.persistence;

import org.csu.mypetstorebackstage.domain.Account;
import org.csu.mypetstorebackstage.domain.Log;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository

public interface AccountMapper {
    /////////用户操作
    List<Account> getAllAccounts();

    Account getAccountByUserId(String userId);

    String getPasswordByUserId(String userId);

    boolean updateAccount(Account account);

    boolean deleteSignonByUserId(String userId);
    boolean deleteAccountByUserId(String userId);
    boolean deleteProfileByUserId(String userId);

    boolean insertAccount(Account account);
    boolean insertSignon(Account account);
    boolean insertProfile(Account account);

    /////////日志操作
    List<Log> getBrowseLogsByUserId(String userId);
    List<Log> getAddLogsByUserId(String userId);

    boolean deleteBrowseLogsByUserId(String userId);
    boolean deleteAddLogsByUserId(String userId);

    boolean deleteBrowseLogById(String logId);
    boolean deleteAddLogById(String logId);
}
